#!/usr/bin/python


str = "123456";  # Only digit in this string
print str.isdigit();

str = "this is string example....wow!!!";
print str.isdigit();




str = "this";  # No space & digit in this string
print str.isalpha();

str = "this is string example....wow!!!";
print str.isalpha();



str = "this is string example....wow!!!";
str = "exam";

print str.index(str);
print str.index(str, 10);
print str.index(str, 40);


str1 = "this is string example....wow!!!";
str2 = "exam";

print str1.find(str2);
print str1.find(str2, 10);
print str1.find(str2, 40);




str = "this is string example....wow!!!";

print "str.center(40, 'a') : ", str.center(40, 'a')



str = "this is string example....wow!!!";

print "str.capitalize() : ", str.capitalize()




str = "this is string example....wow!!! this is really string";
print str.replace("is", "was");
print str.replace("is", "was", 3);


